package com.itheima.service;

import com.itheima.api.SmsCouponHistoryApi;
import com.itheima.vo.PageResult;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

/**
 * @author Hakuna Matata
 * @date 2022-10-12-16:39
 */
@Service
public class CouponHistoryService {
    @DubboReference
    private SmsCouponHistoryApi smsCouponHistoryApi;

    //根据优惠券id，使用状态，订单编号分页获取领取记录
    public PageResult couponList(Integer couponId, String orderSn, Integer pageNum, Integer pageSize, Integer useStatus) {
        //有些可能为空要判断下
        return smsCouponHistoryApi.couponList(couponId, orderSn, pageNum, pageSize, useStatus);
    }
}
